<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/layouts/taglib.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>编辑用户标签</title>
    <%@include file="/WEB-INF/layouts/edit-header.jsp"%>
</head>
<body>
    <div class="create-page tpanel">
        <div class="panel-content">
            <div class="container-fluid">

                <form id="createForm" class="form-horizontal">
                    <input type="hidden" name="id" value="${entity.id}" />
                    <input type="hidden" name="wechatMpId" value="${entity.wechatMpId}" />

                    <div class="form-group form-group-first">
                        <label for="tagName" class="col-sm-2 control-label">标签名称</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control"
                                   id="tagName" name="tagName"
                                   value="${entity.tagName}"
                                   placeholder="请输入标签名称"

                                   minlength="0" maxlength="45"
                            />
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-12" style="text-align: center;">
                                <a class="btn btn-default" href="javascript:window.history.back();">返回</a>
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <input type="submit" class="btn btn-primary" value="保存" />
                        </div>
                    </div>
                </form>

            </div>
        </div>
    </div>
                                                                
    <script type="text/javascript">
    changeTitle('编辑用户标签');
    $(function() {

        initForm('#createForm','${ctx}/admin/wechat/user/tag/update',function(r) {
            var resp = $.parseJSON(r);
            if(resp.code == 'OK') {
                changeUrl('${ctx}/admin/wechat/user/tag');
                topLayer.msg('保存成功', {icon: 1});
            }else {
                topLayer.msg(resp.message, {icon: 2});
            }
        });

    });
    </script>
</body>
</html>
